<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>题库</title>
    
    <script type="javascript" src="js\demo.js"></script>
    <!-- js调用 -->
</head>
<body>
   <div>
    <td>
        var questionData = "{\"question\":\"《草原就是我的家》是哪个民族的民歌？\",\"type\":\"单选题\",\"optionnum\":3,\"option\":\"蒙古族|傣族|侗族\",\"answernum\":1,\"answer\":\"蒙古族\", \"weight\":\"2\"}";
    function parseQuestionDate(){
        questionObj=JSON.parse(questionData);
        console.log(questionObj.question);
        console.log(questionObj.option);
        console.log(questionObj.answer);
    
        var options = questionObj.option.split("|")
        console.log(options)
        
        <!-- 打印内容到页面 -->
       document.write(questionObj.question);
       document.write("a"+options[0]+" "+"b"+options[1]+" "+"c"+options[2])  
    }

    </td>
    var questionData2 ="{\"question\":\"《草原就是我的家》是[]的[]歌曲？\", \"type\":\"单空题\", \"spacenum\":\2,\"answernum\":2,\"answer\":\"蒙古族|民族\",\"weight\":\"2\"}"
    function parseQuestionDate2(){
    questionObj=JSON.parse(questionData2);
    console.log(questionObj.question);
    console.log(questionObj.answer);

    var questions = questionObj.question.split("[]")
    questions[0]
    questions[1]
    questions[2]
    document.write()
    }

    <td>

    </td>
   </div>
    


</body>
</html>